<!DOCTYPE html>
<html>
<head>
    <title></title>
    <#include "/header.html" />
    <style type="text/css">
        html {
            overflow-y: auto;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <#if shiro.hasPermission("cgs:cgsappeal:update")>
                <a class="btn btn-primary" @click="look"><i class="fa fa-pencil-square-o"></i>&nbsp;详情/办理</a>
            </#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default" align="center">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal" style="width:70%!important;">
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">诉求人</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsAppeal.applyUserName"
                           placeholder="" readonly/>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">联系电话</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsAppeal.mobile"
                           placeholder="联系电话" readonly/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">诉求内容</div>
                <div class="col-sm-10" style="width: 40%;">
                    <textarea type="text" class="form-control" width="80%" v-model="cgsAppeal.appealContent"
                              placeholder="诉求内容" readonly></textarea>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">诉求时间</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsAppeal.appealTime"
                           placeholder="诉求时间" readonly/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">诉求状态</div>
                <div class="col-sm-10" style="width: 40%;">
                    <select class="form-control" v-model="cgsAppeal.status" disabled>
                        <option v-for="item in status" :value="item.value">{{item.text}}</option>
                    </select>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">车管所</div>
                <div class="col-sm-10" style="width: 40%;">
                    <select class="form-control" v-model="cgsAppeal.cgsId" disabled>
                        <option v-for="item in cgs" :value="item.value">{{item.text}}</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">受理/不受理时间</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsAppeal.acceptTime"
                           placeholder="受理时间" readonly/>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">不受理原因</div>
                <div class="col-sm-10" style="width: 40%;">
                    <textarea type="text" class="form-control" width="80%" v-model="cgsAppeal.notAcceptReason"
                              placeholder="不受理原因" readonly></textarea>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">车管所意见</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsAppeal.cgsFeedback"
                           placeholder="车管所意见" readonly/>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">车管所处理时间</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsAppeal.cgsHandleTime"
                           placeholder="车管所受理时间" readonly/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">支队意见</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsAppeal.leaderFeedback"
                           placeholder="支队意见" readonly/>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">支队处理时间</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="cgsAppeal.leaderHandleTime"
                           placeholder="支队处理时间" readonly/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">申诉图片</div>
                <div class="col-sm-10" style="width: 40%;">
                    <a href="#" class="thumbnail">
                        <img :src="cgsAppeal.appealImg" style="width:300px;height:200px;"
                             alt="通用的占位符缩略图">
                    </a>
                </div>
            </div>
            <div class="form-group">
                <template v-if="cgsAppeal.status === '1' ">
                    <#if shiro.hasPermission("cgs:cgsappeal:cgsshenli")>
                    <input type="button" class="btn btn-primary" data-toggle="modal" data-target="#cgscheckModal" value="车管所审理"/>
                    </#if>
                </template>
                <template v-if="cgsAppeal.status === '2' ">
                    <#if shiro.hasPermission("cgs:cgsappeal:zdshenli")>
                    <input type="button" class="btn btn-primary" data-toggle="modal" data-target="#cgscheckModal" value="支队审理"/>
                    </#if>
                </template>
                <template v-if="cgsAppeal.status === '4'">
                    <#if shiro.hasPermission("cgs:cgsappeal:cgsbanjie")>
                    <input type="button" class="btn btn-primary" @click="banjie" value="车管所办结"/>
                    </#if>
                </template>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>

    <div class="modal fade" id="cgscheckModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="policePostModalLabel">
                        民意诉求审理
                    </h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" >
                        <div class="form-group">
                            <div class="col-sm-2 control-label" >审理结论</div>
                            <div class="col-sm-10" >
                                <select class="form-control" v-model="shenpi.status" placeholder="请选择">
                                    <template v-if="cgsAppeal.status === '1'">
                                    <option value="2">受理</option>
                                    <option value="3">不受理</option>
                                    </template>
                                    <template v-if="cgsAppeal.status === '2' ">
                                        <option value="4">通过</option>
                                        <option value="6">不通过</option>
                                    </template>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-2 control-label" >
                                <template v-if="cgsAppeal.status === '1'">
                                    审理意见
                                </template>
                                <template v-if="cgsAppeal.status === '2'">
                                    审批意见
                                </template>
                            </div>
                            <div class="col-sm-10" >
                                <template v-if="cgsAppeal.status === '1'">
                                    <textarea type="text" class="form-control" v-model="shenpi.cgsFeedback" placeholder="事由"></textarea>
                                </template>
                                <template v-if="cgsAppeal.status === '2'">
                                    <textarea type="text" class="form-control" v-model="shenpi.leaderFeedback" placeholder="事由"></textarea>
                                </template>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <input type="button" class="btn btn-primary" @click="executeAudit" value="保存"/>
                    <button type="button" class="btn btn-warning" data-dismiss="modal">关闭</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/cgs/cgsappeal.js?_${.now?long}"></script>
</body>
</html>